var e = "showMiddle.jsp";
var shaixuan = '';//筛选
function changePage(a) {
    e = a;
    //alert(e);
}

function getSX(){
    return shaixuan;
}
$(function () {
    //在这添加方法
    getweek();
    getList();
    var show = document.getElementById("show");
    setInterval(function () {
        var time = new Date();
        // 程序计时的月从0开始取值后+1
        var m = time.getMonth() + 1;
        var t = time.getFullYear() + "-" + m + "-"
            + time.getDate() + " " + time.getHours() + ":";
        if (time.getSeconds() < 10) {
            if (time.getMinutes() < 10) {
                t += '0' + time.getMinutes() + ":" + '0' + time.getSeconds();
            } else {
                t += time.getMinutes() + ":" + '0' + time.getSeconds();
            }
        } else {
            if (time.getMinutes() < 10) {
                t += '0' + time.getMinutes() + ":" + time.getSeconds();
            } else {
                t += time.getMinutes() + ":" + time.getSeconds();
            }
        }
        show.innerHTML = t;
        if (time.getMinutes() % 15 === 0 && time.getSeconds() === 30) {
            //alert(1);
            getList();
            getweek();
        }
        //console.log(time.getMinutes() % 15 + "<->" + time.getSeconds())
    }, 1000);

    $.post("./home", function (data) {
            if (data !== null) {
                //console.log(data)
                $('#select').empty();
                $('#select').append('<option value="">全部</option>')
                $.each(data.areaNames, function (index, item) {
                    $('#select').append('<option value="' + item.areaName + '">' + item.areaName + '</option>')
                })
            } else {
                alert("暂无数据")
            }
        }
    )

});
//获得页面4G人数和流量数据并填页面

function ajaxS(v) {
    if (v === '') {
        $('#title').html("河北电信智慧运营");
    } else {
        $('#title').html(v + "4G流量实时分析");
    }
    shaixuan = v;
    getList();
    getweek();
}

function getNowFormatDate() {
    var date = new Date();
    var seperator1 = "-";
    var seperator2 = ":";
    var month = date.getMonth() + 1;
    var strDate = date.getDate();
    if (month >= 1 && month <= 9) {
        month = "0" + month;
    }
    if (strDate >= 0 && strDate <= 9) {
        strDate = "0" + strDate;
    }
    var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate
        + " " + date.getHours() + seperator2 + date.getMinutes()
        + seperator2 + date.getSeconds();
    return currentdate;
}

function getList() {
    $.post("./list", {suggest: shaixuan}, function (data) {
            if (data != null) {
                $("#my1").html(parseInt(data.sumUsers));
                $("#my2").html(parseInt(data.sumFlow));

            } else {
                alert("请求失败或暂无数据")
            }
        }
    )
}
//获得周数据总数和平均值、

function getweek() {
    $.post("./findweek", {suggest: shaixuan}, function (data) {
            if (data != null) {
                week = data;
                load(week)
            } else {
                alert("请求失败或暂无数据")
            }
        }
    )
}

function load(week) {
    //option1的日期数据
    var weekday = [];//时间
    var Op1Num = [];//4g总人数
    var Op1liu = [];//4g流量总数
    var Op12dakai = [];//网页打开优良率
    var Op12shoupingi = [];//网页首屏优良率
    var Op12xiazai = [];//视频下载优良率
    var Op12kadun = [];//视频卡顿频率优良率
    var Op12tongxun = [];//即时通信消息发送成功率
    var Op12youxi = [];//游戏交互时延优良率
    //console.log('week')
    //console.log(week)
    var maxU = 0;
    var maxF = 0;
    var minU = 0;
    var minF = 0;
    for (var i = 0; i < week.length; i++) {
        weekday[i] = week[i].time.substring(10, 16);
        Op1Num[i] = week[i].sumUsers;
        Op1liu[i] = week[i].sumFlow;
        Op12dakai[i] = toDecimal(week[i].pageOpenRate);
        Op12shoupingi[i] = toDecimal(week[i].pageRate);
        Op12xiazai[i] = toDecimal(week[i].vedioDownRate);
        Op12kadun[i] = toDecimal(week[i].vedioStopRate);
        Op12tongxun[i] = toDecimal(week[i].messageRate);
        Op12youxi[i] = toDecimal(week[i].gameRate);

        if (toDecimal(week[i].sumUsers) > maxU) {
            maxU = week[i].sumUsers;
        }
        if (toDecimal(week[i].sumFlow) > maxF) {
            maxF = week[i].sumFlow;
        }

        if (toDecimal(week[i].sumUsers) < minU || minU === 0) {
            minU = week[i].sumUsers;
        }
        if (toDecimal(week[i].sumFlow) < minF || minF === 0) {
            minF = week[i].sumFlow;
        }
    }
    maxU = parseInt(maxU);
    maxU = parseInt(maxU) + (Math.pow(10, (maxU + "").length - 1) - parseInt(maxU) % Math.pow(10, (maxU + "").length - 1));
    maxU = maxU+maxU*0.1;

    maxF = parseInt(maxF);
    maxF = parseInt(maxF) + (Math.pow(10, (maxF + "").length - 1) - parseInt(maxF) % Math.pow(10, (maxF + "").length - 1));
    maxF = maxF+maxF*0.1;

    minU = parseInt(minU);
    minU = minU - parseInt(parseInt(minU) % Math.pow(10, (minU + "").length - 1)) - (Math.pow(10, (minU + "").length - 1) * 2);
    minU = minU-minU*0.2;

    minF = parseInt(minF);
    minF = minF - parseInt(parseInt(minF) % Math.pow(10, (minF + "").length - 1)) - (Math.pow(10, (minF + "").length - 1) * 2);
    minF = minF-minF*0.2;

    /*console.log(maxU)
    console.log(maxF)
    console.log(minU)
    console.log(minF)*/

    function toDecimal(x) {
        var f = parseFloat(x);
        if (isNaN(f)) {
            return;
        }
        f = Math.round(x * 100) / 100;
        return f;
    }

    var cakeliu = [];//饼图数据流量
    var cakerenshu = [];//饼图数据人数

    var zhu = [];
    var name1 = [];
    var cake = [];
    $.ajax({
        url: "./selectTop7XiaoQu?suggest=" + shaixuan,
        cache: false,
        async: false,
        success: function (data) {
            //console.log(data);
            for (var i = 0; i < data.list.length; i++) {
                zhu.push(data.list[i].SumFlow.toFixed(2));
                name1.push(data.list[i].CellName);
            }
            for (var y = 0; y < data.list2.length; y++) {
                //console.log(data[y]);
                var ob1 = {};
                ob1['value'] = data.list2[y].num;
                ob1['name'] = data.list2[y].protocolType;
                cakeliu.push(ob1);
                var ob2 = {};
                ob2['value'] = data.list2[y].flow;
                ob2['name'] = data.list2[y].protocolType;
                cakerenshu.push(ob2);
            }
            var o1 = {};
            o1['value'] = data.faildNum;
            o1['name'] = "出现故障";
            var o2 = {};
            o2['value'] = data.successNum;
            o2['name'] = "未出现故障";
            cake.push(o1);
            cake.push(o2);
            //console.log(cake)
        }
    });

    var left1 = echarts.init(document.getElementById('left1'));
    var left1_option = {
        tooltip: {
            trigger: 'axis'
        },
        color: ['#ff7043', '#4fc3f7'],
        legend: {
            data: ['4G用户数', '4G流量'],
            textStyle: {
                color: '#fff'
            }
        },
        grid: {
            left: '3%',
            right: '3%',
            bottom: '3%',
            containLabel: true
        },
        xAxis: {
            type: 'category',
            boundaryGap: false,
            data: weekday,
            axisLine: {
                lineStyle: {
                    color: '#fff',
                    width: 1//这里是为了突出显示加上的，可以去掉
                }
            }
        },
        yAxis: [
            {
                type: 'value',
                name: '4G用户数',
                max: maxF,
                min: minU,
                axisLabel: {
                    show: true,
                    textStyle: {
                        color: '#fff'
                    }
                },
                axisLine: {
                    lineStyle: {
                        color: '#fff',
                        width: 1//这里是为了突出显示加上的，可以去掉
                    }
                }
            },
            {
                type: 'value',
                name: '4G流量',
                max: maxF,
                min: minU,
                axisLabel: {
                    show: true,
                    textStyle: {
                        color: '#fff'
                    }
                },
                axisLine: {
                    lineStyle: {
                        color: '#fff'
//                        width:1//这里是为了突出显示加上的，可以去掉
                    }
                }
            }
        ],
        series: [
            {
                name: '4G用户数',
                type: 'line',
                data: Op1Num,
                markPoint: {
                    data: [
                        {type: 'max', name: '最大值'},
                        {type: 'min', name: '最小值'}
                    ]
                }
                /*markLine: {
                 data: [
                 {type: 'average', name: '平均值'}
                 ]
                 },*/
            },
            {
                name: '4G流量',
                type: 'line',
                data: Op1liu,
                markPoint: {
                    data: [
                        {type: 'max', name: '最大值'},
                        {type: 'min', name: '最小值'}
                    ]
                }
                /*markLine: {
                 data: [
                 {type: 'average', name: '平均值'}
                 ]
                 },*/
            }
        ]
    };
    left1.setOption(left1_option);
    /*end*/

    var left2_1 = echarts.init(document.getElementById('left2_1'));
    var left2_1_option = {
        tooltip: {
            trigger: 'axis',
            axisPointer: {            // 坐标轴指示器，坐标轴触发有效
                type: 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
            }
        },
        grid: {
            left: '8%',
            right: '10%',
            bottom: '3%',
            containLabel: true
        },
        xAxis: [
            {
                type: 'category',
                axisLabel: {
                    show: true,
                    textStyle: {
                        color: '#fff',
                        fontSize: 1 // 让字体变大
                    }
                },
                //data: ['one', 'two', 'thr', 'fou', 'fiv', 'six', 'sev'],//name1
                data: name1,
                axisTick: {
                    alignWithLabel: true
                },
                axisLine: {
                    lineStyle: {
                        color: '#fff',
//                        width:1//这里是为了突出显示加上的，可以去掉
                    }
                }

            }
        ],
        yAxis: [
            {
                type: 'value',
                axisLabel: {
                    show: true,
                    textStyle: {
                        color: '#fff',
                        fontSize: 1 // 让字体变大
                    }
                },
                axisLine: {
                    lineStyle: {
                        color: '#fff',
//                        width:1//这里是为了突出显示加上的，可以去掉
                    }
                }
            }
        ],
        series: [
            {
                name: '流量',
                type: 'bar',
                barWidth: '60%',
                data: zhu,
                //设置柱体颜色
                itemStyle: {
                    normal: {color: '#89f6ca'}
                }
            }
        ]
    };
    //console.log('zhu')
    //console.log(name1)
    //console.log(zhu)
    left2_1.setOption(left2_1_option);
    /*end*/


    var left2_2 = echarts.init(document.getElementById('left2_2'));
    var left2_2_option = option = {
        /*title: {
         text: 'TOP流量小区',
         x: 'center',
         textStyle: {
         color: '#fff',
         fontSize: 12 // 让字体变大
         }
         },*/
        color: ["#D55B80", "#6EB0EA"],
        tooltip: {
            trigger: 'item',
            formatter: "{a} <br/>{b} : {c} ({d}%)"
        },
        grid: {
            left: '8%',
            right: '10%',
            bottom: '3%',
            containLabel: true
        },
        legend: {
            x: 'center',
            y: 'bottom',
            //data:['直接访问','邮件营销','联盟广告','视频广告','搜索引擎'],
            textStyle: {
                color: '#fff'
            }
        },
        calculable: true,
        series: [
            {
                name: '访问来源',
                type: 'pie',
                radius: [20, 80],
                //center : ['25%', 200],
                //roseType: 'radius',
                //width: '40%',       // for funnel
                //max: 40,            // for funnel
                itemStyle: {
                    normal: {
                        label: {
                            show: true
                        },
                        labelLine: {
                            show: true
                        }
                    },
                    emphasis: {
                        label: {
                            show: true
                        },
                        labelLine: {
                            show: true
                        }
                    }
                },
                data: cake
            }
        ]
    };
    left2_2.setOption(left2_2_option);
    /*end*/
    var left3_1 = echarts.init(document.getElementById('left3_1'));
    var left3_1_option = option = {
        /*title: {
         text: '4G业务类型流量占比',
         x: 'center',
         textStyle: {
         color: '#fff',
         fontSize: 12 // 让字体变大
         }
         },*/
        color: ["#9DB35F", "#61C4C7", "#B2A4D6", "#6EB0EA", "#E2CE47", "#EE896B"],
        tooltip: {
            trigger: 'item',
            formatter: "{a} <br/>{b} : {c} ({d}%)"
        },
        legend: {
            x: 'center',
            y: 'bottom',
            //data:['直接访问','邮件营销','联盟广告','视频广告','搜索引擎'],
            textStyle: {
                color: '#fff'
            }
        },
        calculable: true,
        series: [
            {
                name: '访问来源',
                type: 'pie',
                radius: [20, 80],
                //center : ['25%', 200],
                roseType: 'radius',
                width: '40%',       // for funnel
                max: 40,            // for funnel
                itemStyle: {
                    normal: {
                        label: {
                            show: true
                        },
                        labelLine: {
                            show: true
                        }
                    },
                    emphasis: {
                        label: {
                            show: true
                        },
                        labelLine: {
                            show: true
                        }
                    }
                },
                //data:cakeliu
                data: cakeliu
            }
        ]
    };
    left3_1.setOption(left3_1_option);
    /*end*/

    var left3_2 = echarts.init(document.getElementById('left3_2'));
    var left3_2_option = option = {
        /*title: {
         text: '4G业务类型数量占比',
         x: 'center',
         textStyle: {
         color: '#fff',
         fontSize: 12 // 让字体变大
         }
         },*/
        color: ["#E1757D", "#E2CE47", "#EE896B", "#B6D5DC", "#408FCA", "#51B0D4"],
        tooltip: {
            trigger: 'item',
            formatter: "{a} <br/>{b} : {c} ({d}%)"
        },
        legend: {
            x: 'center',
            y: 'bottom',
            //data:['直接访问','邮件营销','联盟广告','视频广告','搜索引擎'],
            textStyle: {
                color: '#fff'
            }
        },
        calculable: true,
        series: [
            {
                name: '访问来源',
                type: 'pie',
                radius: [20, 80],
                //center : [90,90],
                roseType: 'radius',
                //width: '10%',       // for funnel
                max: 40,            // for funnel
                itemStyle: {
                    normal: {
                        label: {
                            show: true
                        },
                        labelLine: {
                            show: true
                        }
                    },
                    emphasis: {
                        label: {
                            show: true
                        },
                        labelLine: {
                            show: true
                        }
                    }
                },
                //data:cakerenshu
                data: cakerenshu
            }
        ]
    };
    left3_2.setOption(left3_2_option);
    /*end*/


    var right1_1 = echarts.init(document.getElementById('right1_1'));
    var right1_1_option = {
        tooltip: {
            trigger: 'axis'
        },
        color: ['#ff7043', '#4fc3f7'],
        /*legend: {
         data: ['游戏交互时延优良率'],
         textStyle: {
         color: '#fff'
         }
         },*/
        grid: {
            left: '3%',
            right: '10%',
            bottom: '3%',
            containLabel: true
        },
        xAxis: {
            type: 'category',
            boundaryGap: false,
            data: weekday,
            //data: ['周一','周二','周三','周四','周五','周六','周日'],
            axisLine: {
                lineStyle: {
                    color: '#fff',
                    width: 1//这里是为了突出显示加上的，可以去掉
                }
            }
        },
        yAxis: [
            {
                type: 'value',
                name: '',
                position: 'left',
                min: 80,
                max: 100,
                axisLabel: {
                    show: true,
                    textStyle: {
                        color: '#fff'
                    }
                },
                axisLine: {
                    lineStyle: {
                        color: '#fff',
                        width: 1//这里是为了突出显示加上的，可以去掉
                    }
                }
            }
        ],
        series: [
            {
                name: '游戏交互时延优良率',
                type: 'line',
                data: Op12youxi,
                //data:[11, 11, 15, 13, 12, 13, 10],
                markPoint: {
                    data: [
                        {type: 'max', name: '最大值'},
                        {type: 'min', name: '最小值'}
                    ]
                },
                /*markLine: {
                 data: [
                 {type: 'average', name: '平均值'}
                 ]
                 },*/
            }
        ]
    };
    right1_1.setOption(right1_1_option);
    /*end*/

    var right1_2 = echarts.init(document.getElementById('right1_2'));
    var right1_2_option = {
        tooltip: {
            trigger: 'axis'
        },
        color: ['#ff7043', '#4fc3f7'],
        /*color: ['#ff7043', '#4fc3f7'],
         legend: {
         data: ['即时通信消息发送成功率'],
         textStyle: {
         color: '#fff'
         }
         },*/
        grid: {
            left: '3%',
            right: '10%',
            bottom: '3%',
            containLabel: true
        },
        xAxis: {
            type: 'category',
            boundaryGap: false,
            data: weekday,
            //data: ['周一','周二','周三','周四','周五','周六','周日'],
            axisLine: {
                lineStyle: {
                    color: '#fff',
                    width: 1//这里是为了突出显示加上的，可以去掉
                }
            }
        },
        yAxis: [
            {
                type: 'value',
                name: '',
                position: 'left',
                min: 80,
                max: 100,
                axisLabel: {
                    show: true,
                    textStyle: {
                        color: '#fff'
                    }
                },
                axisLine: {
                    lineStyle: {
                        color: '#fff',
                        width: 1//这里是为了突出显示加上的，可以去掉
                    }
                }
            }
        ],
        series: [
            {
                name: '即时通信消息发送成功率',
                type: 'line',
                data: Op12tongxun,
                //data:[11, 11, 15, 13, 12, 13, 10],
                markPoint: {
                    data: [
                        {type: 'max', name: '最大值'},
                        {type: 'min', name: '最小值'}
                    ]
                },
                /*markLine: {
                 data: [
                 {type: 'average', name: '平均值'}
                 ]
                 },*/
            }
        ]
    };
    right1_2.setOption(right1_2_option);
    /*end*/

    var right2_1 = echarts.init(document.getElementById('right2_1'));
    var right2_1_option = {
        tooltip: {
            trigger: 'axis'
        },
        color: ['#ff7043', '#4fc3f7'],
        /*legend: {
         data: ['视频卡顿频率优良率'],
         textStyle: {
         color: '#fff'
         }
         },*/
        grid: {
            left: '3%',
            right: '10%',
            bottom: '3%',
            containLabel: true
        },
        xAxis: {
            type: 'category',
            boundaryGap: false,
            data: weekday,
            //data: ['周一','周二','周三','周四','周五','周六','周日'],
            axisLine: {
                lineStyle: {
                    color: '#fff',
                    width: 1//这里是为了突出显示加上的，可以去掉
                }
            }
        },
        yAxis: [
            {
                type: 'value',
                name: '',
                position: 'left',
                axisLabel: {
                    show: true,
                    textStyle: {
                        color: '#fff'
                    }
                },
                min: 80,
                max: 100,
                axisLine: {
                    lineStyle: {
                        color: '#fff',
                        width: 1//这里是为了突出显示加上的，可以去掉
                    }
                }
            }
        ],
        series: [
            {
                name: '视频卡顿频率优良率',
                type: 'line',
                data: Op12kadun,
                //data:[11, 11, 15, 13, 12, 13, 10],
                markPoint: {
                    data: [
                        {type: 'max', name: '最大值'},
                        {type: 'min', name: '最小值'}
                    ]
                },
                /*markLine: {
                 data: [
                 {type: 'average', name: '平均值'}
                 ]
                 },*/
            }
        ]
    };
    right2_1.setOption(right2_1_option);
    /*end*/

    var right2_2 = echarts.init(document.getElementById('right2_2'));
    var right2_2_option = {
        tooltip: {
            trigger: 'axis'
        },
        color: ['#ff7043', '#4fc3f7'],
        /*legend: {
         data: ['视频下载优良率'],
         textStyle: {
         color: '#fff'
         }
         },*/
        grid: {
            left: '3%',
            right: '10%',
            bottom: '3%',
            containLabel: true
        },
        xAxis: {
            type: 'category',
            boundaryGap: false,
            data: weekday,
            //data: ['周一','周二','周三','周四','周五','周六','周日'],
            axisLine: {
                lineStyle: {
                    color: '#fff',
                    width: 1//这里是为了突出显示加上的，可以去掉
                }
            }
        },
        yAxis: [
            {
                type: 'value',
                name: '',
                position: 'left',
                axisLabel: {
                    show: true,
                    textStyle: {
                        color: '#fff'
                    }
                },
                min: 80,
                max: 100,
                axisLine: {
                    lineStyle: {
                        color: '#fff',
                        width: 1//这里是为了突出显示加上的，可以去掉
                    }
                }
            }
        ],
        series: [
            {
                name: '视频下载优良率',
                type: 'line',
                data: Op12xiazai,
                //data:[11, 11, 15, 13, 12, 13, 10],
                markPoint: {
                    data: [
                        {type: 'max', name: '最大值'},
                        {type: 'min', name: '最小值'}
                    ]
                },
                /*markLine: {
                 data: [
                 {type: 'average', name: '平均值'}
                 ]
                 },*/
            }
        ]
    };
    right2_2.setOption(right2_2_option);
    /*end*/

    var right3_1 = echarts.init(document.getElementById('right3_1'));
    var right3_1_option = {
        tooltip: {
            trigger: 'axis'
        },
        color: ['#ff7043', '#4fc3f7'],
        /*legend: {
         data: ['网页首屏优良率'],
         textStyle: {
         color: '#fff'
         }
         },*/
        grid: {
            left: '3%',
            right: '10%',
            bottom: '3%',
            top: '20%',
            containLabel: true
        },
        xAxis: {
            type: 'category',
            boundaryGap: false,
            data: weekday,
            //data: ['周一','周二','周三','周四','周五','周六','周日'],
            axisLine: {
                lineStyle: {
                    color: '#fff',
                    width: 1//这里是为了突出显示加上的，可以去掉
                }
            }
        },
        yAxis: [
            {
                type: 'value',
                name: '',
                position: 'left',
                axisLabel: {
                    show: true,
                    textStyle: {
                        color: '#fff'
                    }
                },
                min: 80,
                max: 100,
                axisLine: {
                    lineStyle: {
                        color: '#fff',
                        width: 1//这里是为了突出显示加上的，可以去掉
                    }
                }
            }
        ],
        series: [
            {
                name: '网页首屏优良率',
                type: 'line',
                data: Op12shoupingi,
                //data:[11, 11, 15, 13, 12, 13, 10],
                markPoint: {
                    data: [
                        {type: 'max', name: '最大值'},
                        {type: 'min', name: '最小值'}
                    ]
                },
                /*markLine: {
                 data: [
                 {type: 'average', name: '平均值'}
                 ]
                 },*/
            }
        ]
    };
    right3_1.setOption(right3_1_option);
    /*end*/

    var right3_2 = echarts.init(document.getElementById('right3_2'));
    var right3_2_option = {
        tooltip: {
            trigger: 'axis'
        },
        color: ['#ff7043', '#4fc3f7'],
        /*legend: {
         data: ['网页打开优良率'],
         textStyle: {
         color: '#fff'
         }
         },*/
        grid: {
            left: '3%',
            right: '10%',
            bottom: '3%',
            containLabel: true
        },
        xAxis: {
            type: 'category',
            boundaryGap: false,
            data: weekday,
            //data: ['周一','周二','周三','周四','周五','周六','周日'],
            axisLine: {
                lineStyle: {
                    color: '#fff',
                    width: 1//这里是为了突出显示加上的，可以去掉
                }
            }
        },
        yAxis: [
            {
                type: 'value',
                name: '',
                position: 'left',
                axisLabel: {
                    show: true,
                    textStyle: {
                        color: '#fff'
                    }
                },
                min: 80,
                max: 100,
                axisLine: {
                    lineStyle: {
                        color: '#fff',
                        width: 1//这里是为了突出显示加上的，可以去掉
                    }
                }
            }
        ],
        series: [
            {
                name: '网页打开优良率',
                type: 'line',
                data: Op12dakai,
                //data:[11, 11, 15, 13, 12, 13, 10],
                markPoint: {
                    data: [
                        {type: 'max', name: '最大值'},
                        {type: 'min', name: '最小值'}
                    ]
                },
                /*markLine: {
                 data: [
                 {type: 'average', name: '平均值'}
                 ]
                 },*/
            }
        ]
    };
    right3_2.setOption(right3_2_option);
    /*end*/

    window.onresize = left1.resize;
    window.onresize = left2_1.resize;
    window.onresize = left2_2.resize;
    window.onresize = left3_1.resize;
    window.onresize = left3_2.resize;

    window.onresize = right1_1.resize;
    window.onresize = right1_2.resize;
    window.onresize = right2_1.resize;
    window.onresize = right2_2.resize;
    window.onresize = right3_1.resize;
    window.onresize = right3_2.resize;

    document.getElementById('J_iframe').src = "./" + e;

}